package com.xmall.pethouse_api.service;

import com.xmall.pethouse_api.pojo.entity.ShopProduct;
import com.xmall.pethouse_api.pojo.entity.ShopCart;
import com.xmall.pethouse_api.pojo.entity.ShopOrder;
import com.xmall.pethouse_api.pojo.entity.ShopOrderItem;
import java.util.List;

public interface ShopService {
    // 商品
    List<ShopProduct> listProducts();
    ShopProduct getProductById(Long id);
    void addProduct(ShopProduct product);
    void updateProduct(ShopProduct product);
    void deleteProduct(Long id);

    // 购物车
    List<ShopCart> listCartByUserId(Long userId);
    List<com.xmall.pethouse_api.pojo.vo.CartVO> listCartVOByUserId(Long userId);
    void addCartItem(Long userId, Long productId, Integer quantity);
    void updateCartItem(Long cartId, Integer quantity);
    void deleteCartItem(Long cartId);
    void clearCart(Long userId);

    // 订单
    List<ShopOrder> listOrdersByUserId(Long userId);
    ShopOrder getOrderById(Long id);
    void createOrder(Long userId, Long addressId, String remark);
    // 订单明细
    List<ShopOrderItem> listOrderItemsByOrderId(Long orderId);
} 